package com.spboot.tx.pojo;

import com.baomidou.mybatisplus.annotation.*;
import com.jntoo.db.*;
import java.io.Serializable;
import java.util.*;

@TableName("wenjuan")
public class Wenjuan implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(type = IdType.AUTO)
    private Integer id;

    private String zhuti;

    private String tupian;

    private String xiangqing;

    private String yisheng;

    private String addtime;
    private String issh;

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public Long getTimuCount() {
        return DB.name("timu").where("wenjuanid", id).count();
    }

    public Long getDatiCount() {
        return DB.name("dati").where("wenjuanid", id).count();
    }

    public Long getJieguoCount() {
        return DB.name("jieguo").where("wenjuanid", id).count();
    }

    public Long getJianyiCount() {
        return DB.name("jianyi").where("wenjuanid", id).count();
    }

    public String getZhuti() {
        return zhuti;
    }

    public void setZhuti(String zhuti) {
        this.zhuti = zhuti == null ? "" : zhuti.trim();
    }

    public String getTupian() {
        return tupian;
    }

    public void setTupian(String tupian) {
        this.tupian = tupian == null ? "" : tupian.trim();
    }

    public String getXiangqing() {
        return xiangqing;
    }

    public void setXiangqing(String xiangqing) {
        this.xiangqing = xiangqing == null ? "" : xiangqing.trim();
    }

    public String getYisheng() {
        return yisheng;
    }

    public void setYisheng(String yisheng) {
        this.yisheng = yisheng == null ? "" : yisheng.trim();
    }

    public Wxuser getYishenguser() {
        return DB.name(Wxuser.class).where("id", yisheng).find();
    }

    public String getAddtime() {
        return addtime;
    }

    public void setAddtime(String addtime) {
        this.addtime = addtime == null ? "" : addtime.trim();
    }

    public String getIssh() {
        return issh;
    }

    public void setIssh(String issh) {
        this.issh = issh == null ? "" : issh.trim();
    }
}
